<?php

defined("_JEXEC") or die("Restricted access");

//import view trong joomla
jimport('joomla.application.component.view');
 //HTML View class for the HelloWorld Component
class cauhoiViewcauhoi extends JView
{
    function display($tpl = null) {
       $this->data		= $this->get('Data');
		$this->form		= $this->get('Form');
		$this->state	= $this->get('State');
		$this->params	= $this->state->get('params');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode('<br />', $errors));
			return false;
		}

		// Check for layout override
		$active = JFactory::getApplication()->getMenu()->getActive();
		if (isset($active->query['layout'])) {
			$this->setLayout($active->query['layout']);
		}
                //dua chu de len giao dien
                $model = $this->getModel();
                $listchude = $model->laychude();
                $this->assignRef("chude", $listchude);
                //print_r($listchude);
                
                
		parent::display($tpl);
    }
    
    
}
